/*
 * @Date: 2023-02-15 19:16:08
 * @LastEditTime: 2023-03-10 21:28:08
 * @FilePath: /hash-guess-game/src/api/module/home.ts
 * 介绍:首页
 */
import { defaHttp, ApiRes, ApiReturn } from "../index";

/**首页数据 */
export async function apiHomeData(): ApiReturn<HomeData.Res> {
  const res = await defaHttp.post<ApiRes<HomeData.Res>>("/index", undefined, {
    mode: ["showError"],
  });
  if (res.code !== 200) return;
  return res.data;
}

/**首页数据 */
export namespace HomeData {
  export interface Res {
    /**当日算力 */
    today_loss: number;
    /**当前算力 */
    loss: number;
    /**当日流水 */
    today: number;
    /**VIP金额 */
    vip: number;
    /**地址 */
    address: string;
    address_spl: string;
    /**加速卡倍数 */
    share_multiple: string;
    /**加速卡打款地址 */
    share_address: string;
    /**HASH总量 */
    total_solrs_number: number;
    /**加速卡价格USDT */
    speed_price: StrNumber;
    /**加速卡收币地址 */
    speed_address: string;
  }
}
